package com.fanshuai.mybatis_plus.domain;

import lombok.Data;
import org.apache.commons.lang.StringUtils;

import java.util.Date;

@Data
public class User {
    private long id;
    private String userName;
    private String phone;
    private String nickname;
    private String imageUrl;
    private Date createTime;
    private Date updateTime;
    private int status;

    private String unionId;
    private String thirdOpenId;

    public boolean bindPhone() {
        return StringUtils.isNotBlank(phone);
    }

    public boolean bindWechat() {
        return StringUtils.isNotBlank(unionId);
    }

    public boolean isDelete() {
        return status == 1;
    }
}
